package com.example.missingpersons.utils;

import lombok.AllArgsConstructor;
import lombok.Data;


@Data
@AllArgsConstructor
public class Result {
    private String code;
    private String message;
    private Object data;


    public static Result success(String message,Object data){
        return new Result("200",message,data);
    }
    public static Result success(Object data){
        return new Result("200","",data);
    }
    public static Result error(String message, Object data){
        return new Result("400",message,data);
    }
    public static Result error(Object data){
        return new Result("400","",data);
    }

    public static Result warn(Object data){
        return new Result("666","",data);
    }
}
